import { DeleteDto, IndexDto, ShowDto } from '@libs/common/dto';
import { ApiProperty, PartialType } from '@nestjs/swagger';
import { IsBoolean, IsNotEmpty } from 'class-validator';

import { SysUser } from '../entities/sys-user.entity';

export class IndexSysUserDto extends IndexDto<SysUser> {}

export class ShowSysUserDto extends ShowDto {}

export class DeleteSysUserDto extends DeleteDto {}

export class CreateSysUserDto {}

export class UpdateSysUserDto extends PartialType(CreateSysUserDto) {
  @ApiProperty()
  @IsNotEmpty({ message: 'id 不能为空' })
  id: string;
}

export class SwitchSysUserDto {
  @ApiProperty()
  @IsNotEmpty({ message: 'id 不能为空' })
  id: string;

  @ApiProperty({ description: '状态' })
  @IsNotEmpty({ message: '状态不能为空' })
  @IsBoolean()
  status: boolean;
}

export class ImportSysUserDto {}

export class ExportSysUserDto {}
